package cn.exrick.service;

import java.util.List;

import cn.exrick.pojo.TbItemSkuGoodCat;
import cn.exrick.pojo.TbItemSkuGoodCatAttr;

public interface ItemSkuGoodCatAttrService extends BaseService<TbItemSkuGoodCatAttr> {
	/**
	 * 通过商品id查询他关联的二级分类
	 * 
	 * @param itemId
	 * @return
	 */
	TbItemSkuGoodCatAttr findByItemId(long itemId);

	/**
	 * 通过上级id查询他关联的二级分类
	 * 
	 * @param catId
	 * @return
	 */
	List<TbItemSkuGoodCatAttr> findByCatId(long catId);

	/**
	 * 传入attrId,查询以attrId为终点的树
	 * 
	 * @param attrId
	 * @return
	 */
	List<TbItemSkuGoodCat> findOneTreeByAttrId(long attrId);
}
